import functools

func = lambda x: print(x ** 10)

func(2)

my_list = [2, 4, 8, 3, 1]

result_list = map(lambda x: x ** 4, my_list)

for i in result_list:
    print(i)

result = functools.reduce(lambda x, y: x + y, my_list)

print(result)

# reduce 求阶乘
my_list = [i for i in range(1, 7)]

result = functools.reduce(lambda x, y: x * y, my_list)
print(result)

my_list = ['a,b', 'a,b,e', 'e,g', 't,g', 'n,p', 'v,q', 'c,l']

result_list = map(lambda x: str(x).replace(",", ''), my_list)
print(list(result_list))
# for i in result_list:
#     print(str(i))
